package cn.cas.mango.config;

public class Mapping {
  public static String mapping() {
    return "{" +
        "\"properties\": {" +
        "\"id\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_source\": {" +
        "\"type\": \"integer\"" +
        "}," +
        "\"news_website\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_website_type\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_url\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_title\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_content\": {" +
        "\"type\": \"text\"" +
        "}," +
        "\"news_author\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_media_name\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_publictime\": {" +
        "\"type\": \"date\"," +
        "\"format\": \"yyyy-MM-dd HH:mm:ss||epoch_second\"" +
        "}," +
        "\"news_publicdate\": {" +
        "\"type\": \"date\"," +
        "\"format\": \"yyyy-MM-dd||epoch_second\"" +
        "}," +
        "\"news_language\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_title_zh\": {" +
        "\"type\": \"text\"," +
        "\"analyzer\": \"ik_max_word\"" +
        "}," +
        "\"news_content_zh\": {" +
        "\"type\": \"text\"," +
        "\"analyzer\": \"ik_max_word\"" +
        "}," +
        "\"news_keywords\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_summary\": {" +
        "\"type\": \"text\"," +
        "\"analyzer\": \"ik_max_word\"" +
        "}," +
        "\"news_entities\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_entities_person\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_entities_place\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_entities_organization\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_type\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"crawl_time\": {" +
        "\"type\": \"date\"," +
        "\"format\": \"yyyy-MM-dd HH:mm:ss||epoch_second\"" +
        "}," +
        "\"domain\": {" +
        "\"type\": \"keyword\"" +
        "}," +
        "\"news_cluster_id\": {" +
        "\"type\": \"keyword\"" +
        "}" +
        "}" +
        "}";
  }

  public static String setting() {
    return "{" +
        "\"number_of_shards\": SHARDS," +
        "\"number_of_replicas\": NUM_REPLICA," +
        "\"max_result_window\": MAX_RESULT_WINDOW" +
        "}";
  }
}
